package mybox.engine;

public class Triangle implements Figur {
	
	File4Qcad file4qcad;
	QVector ecke1, ecke2, ecke3;
	
	QVector ecke1_ecke2;
	QVector ecke1_ecke3;
	QVector ecke2_ecke3;
	
	public Triangle(File4Qcad file4qcad, QVector ecke1, QVector ecke2, QVector ecke3) {
		this.file4qcad=file4qcad;
		this.ecke1=ecke1;
		this.ecke2=ecke2;
		this.ecke3=ecke3;
		ecke1_ecke2=new QVector (ecke2.x-ecke1.x,ecke2.y-ecke1.y);
		ecke1_ecke3=new QVector (ecke3.x-ecke1.x,ecke3.y-ecke1.y);
		ecke2_ecke3=new QVector (ecke3.x-ecke2.x,ecke3.y-ecke2.y);
		draw();		
	}

	public void draw() {
		
		file4qcad.println(ecke1_ecke2.printLineAktPosNeutral(ecke1));
		file4qcad.println(ecke1_ecke3.printLineAktPosNeutral(ecke1));
		file4qcad.println(ecke2_ecke3.printLineAktPosNeutral(ecke2));		
				
	}

}
